<html><head><title>SetGadgetFont</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">SetGadgetFont()</font></b></p>
<p><b>Syntax</b></p><blockquote>
<font color="#006666"><b>SetGadgetFont</b></font>(#Gadget, FontID)</blockquote>

</blockquote>
<b>Description</b><br><blockquote>

Changes the font of the specified gadget. 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>#Gadget</i></td>
<td width="90%"> 
The gadget to use. 
If this parameter is set to <font color="#924B72">#PB_Default</font>, the font used by newly created 
gadgets is changed. 

</td></tr>
<tr><td><i>FontID</i></td>
<td> 
The font to set. 
The <a href="../font/fontid.html">FontID()</a> function can be used to easily obtain a valid FontID. 
If this parameter is set to <font color="#924B72">#PB_Default</font>, then the system default font will 
be used. 

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>
None.


</blockquote><p><b>Example</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#006666">If</font></b> <font color="#006666">OpenWindow</font>(0, 0, 0, 222, 130, "SetGadgetFont", <font color="#924B72">#PB_Window_SystemMenu</font> | <font color="#924B72">#PB_Window_ScreenCentered</font>)
    <b><font color="#006666">If</font></b> <font color="#006666">LoadFont</font>(0, "Arial", 16)
<font color="#006666">      SetGadgetFont</font>(<font color="#924B72">#PB_Default</font>,<font color="#006666"> FontID</font>(0))   <font color="#006666">; Set the loaded Arial 16 font as new standard</font>
    <b><font color="#006666">EndIf</font></b>
<font color="#006666">    ButtonGadget</font>(0, 10, 10, 200, 30, "Button - Arial 16")
<font color="#006666">    SetGadgetFont</font>(<font color="#924B72">#PB_Default</font>, <font color="#924B72">#PB_Default</font>)  <font color="#006666">; Set the font settings back to original standard font</font>
<font color="#006666">    ButtonGadget</font>(1, 10, 50, 200, 30, "Button - standard")
    <b><font color="#006666">If</font></b> <font color="#006666">LoadFont</font>(1,"Courier",10, <font color="#924B72">#PB_Font_Bold</font> | <font color="#924B72">#PB_Font_Underline</font>)
<font color="#006666">      SetGadgetFont</font>(<font color="#924B72">#PB_Default</font>,<font color="#006666"> FontID</font>(1))   <font color="#006666">; Set the loaded Courier 10 font as new standard</font>
    <b><font color="#006666">EndIf</font></b>
<font color="#006666">    TextGadget</font>(2, 10, 90, 200, 40, "Bold + underlined Courier 10 Text", <font color="#924B72">#PB_Text_Center</font>)
    <b><font color="#006666">Repeat</font></b> : <b><font color="#006666">Until</font></b> <font color="#006666">WaitWindowEvent</font>() = <font color="#924B72">#PB_Event_CloseWindow</font>
  <b><font color="#006666">EndIf</font></b>
</font></pre>
<br>
<p><img src="../HelpPictures/setgadgetfont.png"></p>

</blockquote><p><b>See Also</b></p><blockquote>

<a href="getgadgetfont.html">GetGadgetFont()</a>, <a href="../font/fontid.html">FontID()</a>, <a href="../font/loadfont.html">LoadFont()</a> 

</Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><- <a href=setgadgetdata.html>SetGadgetData()</a> - <a href=index.html>Gadget Index</a> - <a href=setgadgetitemattribute.html>SetGadgetItemAttribute()</a> ->

</body></html>